import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Course from "../components/Course";
import Detail from "../components/Detail";
import Cart from "../components/Cart";
import Login from "../components/login";
import Register from "../components/Register";
import Personal from "../components/Personal";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      // name: 'HelloWorld',  // 路径起别名
      name: 'Home',  // 路径起别名
      component: Home,
    },
    {
      path: '/course/',
      name: 'Course',  // 路径起别名
      component: Course,
    },
    {
      path: '/detail/',
      name: 'Detail',  // 路径起别名
      component: Detail,
    },
    {
      path: '/cart/',
      name: 'Cart',  // 路径起别名
      component: Cart,
    },
    {
      path:'/login/',
      name:'login',
      component:Login,
    },
    {
      path:'/register/',
      name:'register',
      component:Register
    },
        {
      path:'/personal/',
      name:'personal',
      component:Personal
    }
  ]
})
